home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
ASSEMBLER
/
EXTASM
/
Examples
/
StructEx
< prev
Wrap
Text File
|
1993-11-16
|
557b
|
28 lines
; Example of struct's
;------------------------
#smile
#quit
#append <Tmp$Path>.Macros
struct mouse {
.x_pos dcd 0
.y_pos dcd 0
.buttons dcd 0
.size ; .size = size of struct!
}
PROG_INIT
swi OS_Mouse
str r0,InfoBlock+mouse.x_pos
str r1,InfoBlock+mouse.y_pos
str r2,InfoBlock+mouse.buttons
PROG_EXIT
.InfoBlock
dbb mouse.size,0 ; auto-alloc enough memory
align ; align, coz it might be byte-aligned!